package se.webbzon.boltzmann.game;

public interface GameManager {
	
	/** Refreshes the list of available games. **/
	public void refresh() throws Exception;
	
	/** Returns the maximal number of games that may be created. 
	 * For arbitrary number of games -1 may be returned. **/
	public int maxGames();
	
	/** Returns the number of saved games. **/
	public int games();
	
	/** Returns the (n+1):th saved game. **/
	public Game getGame(int n);
	
	/** Creates and returns a new game. If the game could not be created
	 * then null is returned. **/
	public Game createGame(String name) throws Exception;
	
	/** Removes the (n+1):th saved game. **/
	public boolean removeGame(int n) throws Exception; 

}
